<!-- // 多语言 -->
<script lang="ts" setup>
import LangIcon from '~/layouts/select-lang/lang-icon.vue'

defineProps<{
  value: string
}>()

const emit = defineEmits(['update:value'])

const appStore = useAppStore()

function handleSelect(lang: string) {
  emit('update:value', lang)
}
</script>

<template>
  <n-dropdown
    :options="appStore.localesOptions"
    :value="value"
    trigger="hover"
    @select="handleSelect"
  >
    <div class="text-18px cursor-pointer">
      <LangIcon />
    </div>
  </n-dropdown>
</template>

<style scoped></style>
